//
//  MNVCMain.m
//  MONO3
//
//  Created by yaohongchao on 16/1/20.
//  Copyright © 2016年 yaohongchao. All rights reserved.
//

#import "ZKVCMain.h"


@interface ZKVCMain ()

@end

@implementation ZKVCMain

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setup];
    // Do any additional setup after loading the view.
}

-(void)setup{
    NSArray *vcNames=@[@{@"vcName":@"ZKVCSubscribe",
                           @"title":@"订阅",
                           @"image":@"DashboardTabBarItemSubscription"
                           },
                          @{@"vcName":@"ZKVCHotSpot",
                            @"title":@"热点",
                            @"image":@"DashboardTabBarItemDailyHot"
                            },
                         @{@"vcName":@"ZKVCFun",
                           @"title":@"玩乐",
                           @"image":@"DashboardTabbarLife",
                            },
                         @{@"vcName":@"ZKVCCommunity",
                           @"title":@"社区",
                           @"image":@"DashboardTabBarItemDiscussion"
                           }];
    
    for (NSDictionary *dict in vcNames) {
        NSString *strVc=[dict objectForKey:@"vcName"];
        NSString *strTitle=[dict objectForKey:@"title"];
        NSString *strImgNor=[dict objectForKey:@"image"];
        ZKViewController *vc = [[NSClassFromString(strVc) alloc]init];
        vc.hidesBottomBarWhenPushed = NO;
        UINavigationController *nav=[[UINavigationController alloc]initWithRootViewController:vc];
        nav.tabBarItem.image=[UIImage imageNameFromeBundle:strImgNor];
        nav.tabBarItem.title=strTitle;
        [self addChildViewController:nav];
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
